import request from '@/utils/request'

// 查询开工预付款列表
export function listBsStartAdvance(query) {
  return request({
    url: '/cm/bsStartAdvance/list',
    method: 'get',
    params: query
  })
}

// 查询
export function listDataBsStartAdvance(query) {
  return request({
    url: '/cm/bsStartAdvance/listData',
    method: 'get',
    params: query
  })
}

// 查询开工预付款详细
export function getBsStartAdvance(id) {
  return request({
    url: '/cm/bsStartAdvance/' + id,
    method: 'get'
  })
}

// 保存开工预付款
export function saveBatch(data) {
  return request({
    url: '/cm/bsStartAdvance/saveBatch',
    method: 'post',
    data: data
  })
}

export function addBsStartAdvance(data) {
  return request({
    url: '/cm/saveBatch',
    method: 'post',
    data: data
  })
}

// 修改开工预付款
export function updateBsStartAdvance(data) {
  return request({
    url: '/cm/bsStartAdvance',
    method: 'put',
    data: data
  })
}

// 删除开工预付款
export function delBsStartAdvance(id) {
  return request({
    url: '/cm/bsStartAdvance/' + id,
    method: 'delete'
  })
}

// 根据期数删除选中的开工预付款
export function removeQsBsStartAdvance(query) {
  return request({
    url: '/cm/bsStartAdvance/removeQs',
    method: 'get',
    params: query
  })
}